package com.neusoft.neumooc.service;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.neusoft.core.common.exception.ServiceException;
import com.neusoft.neumooc.VO.UserVO;
import com.neusoft.neumooc.dao.UserDAO;

@Service
@Transactional
public class UserServiceImpl implements UserService {

	@Autowired
	UserDAO userDAO;

	/**
	 * @Title: getUserByName
	 * @Description: TODO 通过登录名获取用户
	 * @param userName
	 *            登录用户名
	 * @return Map<String, Object>
	 */
	@Override
	public Map<String, Object> getUserByName(String userName)
			throws ServiceException {
		return userDAO.getUserByName(userName);
	}

	/**
	 * @Title: register
	 * @Description: TODO 用户注册
	 * @param userVO
	 * @throws ServiceException
	 */
	@Override
	public void register(UserVO userVO) throws ServiceException {
		userDAO.register(userVO);
	}
}
